package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.AbstractAccount;
import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.Client;

public class BankService {
	
	void addClient(Bank bank, Client client) {
		bank.addClient(client);
	}
	
	void printMaximumAmountToWithdraw(Bank bank) {
		int num = bank.getNumClients();
		Client client1;	
		AbstractAccount account1;
		for (int i = 0; i < num; i++) {
			client1 = bank.getClient(i);
			account1 = client1.getAccount(0);
			System.out.println("Maximum amount to withdraw for client " + i + " is " + account1.maximumAmountToWithdraw());
		}
	}
}
